#include "..\platf\io_input.h"

#include <windows.h>

int keyMappings[256];


int initKeyboard()
{
	for (int i=0;i<256;i++)
		keyMappings[i] = K_NONE;

	for (int i='A';i<='Z';i++)
		keyMappings[i] = i;

	for (int i='0';i<='9';i++)
		keyMappings[i] = i;

	keyMappings[VK_BACK]		= K_BACKSPACE;
	keyMappings[VK_TAB]			= K_TAB;
	keyMappings[VK_RETURN]		= K_ENTER;
	keyMappings[VK_ESCAPE]		= K_ESCAPE;
	keyMappings[VK_SPACE]		= K_SPACE;
	keyMappings[VK_SHIFT]		= K_SHIFT;
	keyMappings[VK_CONTROL]		= K_CTRL;
	keyMappings[VK_MENU]		= K_ALT;
	keyMappings[VK_PAUSE]		= K_PAUSE;
	keyMappings[VK_CAPITAL]		= K_CAPS;
	keyMappings[0xC0]			= K_TILDE;
	keyMappings[VK_INSERT]		= K_INS;
	keyMappings[VK_DELETE]		= K_DEL;
	keyMappings[VK_HOME]		= K_HOME;
	keyMappings[VK_END]			= K_END;
	keyMappings[VK_PRIOR]		= K_PGUP;
	keyMappings[VK_NEXT]		= K_PGDN;
	keyMappings[VK_UP]			= K_UPARROW;
	keyMappings[VK_DOWN]		= K_DOWNARROW;
	keyMappings[VK_LEFT]		= K_LEFTARROW;
	keyMappings[VK_RIGHT]		= K_RIGHTARROW;
	keyMappings[VK_NUMPAD0]		= K_KP_0;
	keyMappings[VK_NUMPAD1]		= K_KP_1;
	keyMappings[VK_NUMPAD2]		= K_KP_2;
	keyMappings[VK_NUMPAD3]		= K_KP_3;
	keyMappings[VK_NUMPAD4]		= K_KP_4;
	keyMappings[VK_NUMPAD5]		= K_KP_5;
	keyMappings[VK_NUMPAD6]		= K_KP_6;
	keyMappings[VK_NUMPAD7]		= K_KP_7;
	keyMappings[VK_NUMPAD8]		= K_KP_8;
	keyMappings[VK_NUMPAD9]		= K_KP_9;
	keyMappings[VK_DIVIDE]		= K_KP_DIVIDE;
	keyMappings[VK_MULTIPLY]	= K_KP_MULTIPLY;
	keyMappings[VK_SUBTRACT]	= K_KP_MINUS;
	keyMappings[VK_ADD]			= K_KP_PLUS;
//	keyMappings[VK_]			= K_KP_ENTER;
	keyMappings[VK_DECIMAL]		= K_KP_PERIOD;
	keyMappings[VK_OEM_MINUS]	= K_MINUS;
	keyMappings[VK_OEM_PLUS]	= K_PLUS;
	keyMappings[VK_OEM_4]		= K_LBRACKET;
	keyMappings[VK_OEM_6]		= K_RBRACKET;
	keyMappings[VK_OEM_5]		= K_BACKSLASH;
	keyMappings[VK_OEM_1]		= K_SEMICOLON;
	keyMappings[VK_OEM_7]		= K_QUOTE;
	keyMappings[VK_OEM_COMMA]	= K_COMMA;
	keyMappings[VK_OEM_PERIOD]	= K_PERIOD;
	keyMappings[VK_OEM_2]		= K_SLASH;
	keyMappings[VK_F1]			= K_F1;
	keyMappings[VK_F2]			= K_F2;
	keyMappings[VK_F3]			= K_F3;
	keyMappings[VK_F4]			= K_F4;
	keyMappings[VK_F5]			= K_F5;
	keyMappings[VK_F6]			= K_F6;
	keyMappings[VK_F7]			= K_F7;
	keyMappings[VK_F8]			= K_F8;
	keyMappings[VK_F9]			= K_F9;
	keyMappings[VK_F10]			= K_F10;
	keyMappings[VK_F11]			= K_F11;
	keyMappings[VK_F12]			= K_F12;

	for (int i=0;i<
	return 1;
}

int mapKey(int native)
{
	return keyMappings[native];
}
